From: Jasper St. Pierre Date: Wed, 11 Sep 2013 19:09:09 +0000 (-0400) Subject: dnd: Remove the queue updated ID for completed drags as well X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3453 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=744749f2f3660d43a2eea3d905fafa7229dc9623;p=gnome-shell.git dnd: Remove the queue updated ID for completed drags as well I thought that cancelDrag was called for completed drags as well, but it's not. Move the updateHoverId source removal to dragComplete. This fixes "this._dragActor is undefined" warnings after completed drags. https://bugzilla.gnome.org/show_bug.cgi?id=707935 --- diff --git a/js/ui/dnd.js b/js/ui/dnd.js index 411a1d6ca..6752eb32d 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -517,11 +517,6 @@ const _Draggable = new Lang.Class({ }, _cancelDrag: function(eventTime) { - if (this._updateHoverId) { - GLib.source_remove(this._updateHoverId); - this._updateHoverId = 0; - } - this.emit('drag-cancelled', eventTime); this._dragInProgress = false; let [snapBackX, snapBackY, snapBackScale] = this._getRestoreLocation(); @@ -617,6 +612,11 @@ const _Draggable = new Lang.Class({ this._lastEnterActor = null; } + if (this._updateHoverId) { + GLib.source_remove(this._updateHoverId); + this._updateHoverId = 0; + } + this._dragActor = undefined; currentDraggable = null; }